package jmini.examples.modules;

import java.util.List;

import jmini.annotation.AP_FIELD;
import jmini.annotation.AP_MODEL;
import jmini.annotation.AP_ONE2MANY;
import jmini.modules.Module;

/**
 * 人
 * @author Changsheng.Ma
 */
@AP_MODEL(tableName="PEOPLE")
public class People extends Module{
	
	private static final long serialVersionUID = 1L;
	
	@AP_FIELD(fieldName="NAME")
	private String name = null;
	
	@AP_FIELD(fieldName="GENDER")
	private String gender = null;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}
	
	/**
	 * 关联宠物信息
	 */
	@AP_ONE2MANY(modelType=Pet.class, fieldName="OWNER_ID")
	private List<Pet> pets = null;
	
	public List<Pet> getPets() {
		return pets;
	}

	public void setPets(List<Pet> pets) {
		this.pets = pets;
	}
	
}
